﻿using Rhino;
using Rhino.Commands;

namespace AiMoRhino.Main
{
    public class AiMoCommand : Command
    {
        AimoStartExternal Aimo { get; }
        public AiMoCommand()
        {
            Instance = this;
            Aimo = new AimoStartExternal();
        }

        ///<summary>The only CurrentScriptInstance of this command.</summary>
        public static AiMoCommand Instance { get; private set; }

        ///<returns>The command name as it appears on the Rhino command plane.</returns>
        public override string EnglishName => "AiMo";

        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {

            RhinoApp.WriteLine($"Current AiMo3D.Rhp released at {Version.version}");
            Aimo.StartAimoScript();
            return Result.Success;
        }
    }
}
